<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		 <title>来源分析</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<%@ include file="/WEB-INF/jspf/taglibs.jspf" %>
		<%@ include file="/WEB-INF/jspf/statics.jspf" %>
	</head>
	<body>
		<%@include file="/WEB-INF/pages/common/header.jsp" %>
		<%@include file="/WEB-INF/pages/common/menu.jsp" %>
		<div id="rightqqqq" style="border-left-style:groove ;float:left;width:88%;height:10px;margin-left:4px;min-height:80%;overflow-y:auto; overflow-x:hidden; ">
					<div style="margin:10px 0px;height:auto;">
					<div id="navContainer" class="navC mb10">  
				        <ul>  
				            <li class="current"><a name="now" oonclick="reChinaMap()" hidefocus="true">客源地分析</a></li>  
				            <li><a name="today" onclick="chartPie()" hidefocus="true">省源地分析</a></li> 
				            <li><a name="yestoday" onclick="stageAnalyze();" hidefocus="true">阶段分析</a></li>  
				        </ul>  
   					 </div> 
						<div id="container"	style="min-width: 250px; height:100%;margin: 0 auto;" class="containerStyle"></div>
					</div>
					 <div class="testaa" style="width:99%;height:10px;"></div>
				</div>
	</body>
</html>
<script type="text/javascript" src="http://code.highcharts.com/maps/highmaps.js"></script>
<script type="text/javascript" src="<%=basePath%>js/highcharts/china-data.js"></script>
<script type="text/javascript" src="<%=basePath %>/js/ui/jquery-ui-1.10.3.datepicker_zh_CN.js"></script>
<script type="text/javascript" src="<%=basePath %>/js/ui/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript">
$().ready(function(){
	$('#navigation').accordion({
		header: '.head',
		navigation1: true, 
		event: 'click',
		fillSpace: true,
		active:1,
		animated: 'bounceslide'
	});
	$("a[class='actived']").removeAttr("class");
	$("#source").attr("class", "actived");
	$("#currentPosition").text("当前位置：统计报表> 来源分析 >客源地分析");
});
$(function(){
	chinaMap([${provicesData}])
})
function reChinaMap(){
	window.location.href="${ctx }/visitor/statistics/chart/source_map";
}

function chartPie(){
	window.location.href="${ctx }/visitor/statistics/chart/eve_provice_visitor_pie";
}
function stageAnalyze(){
	window.location.href="${ctx }/visitor/statistics/chart/source_stage";
}
function chinaMap(data){
	$('#container').highcharts('Map', {
        title : {
           	text : ''
        },
        subtitle : {
            text : '地区分布'
        },
        mapNavigation: {
            enabled: true,
            buttonOptions: {
                verticalAlign: 'bottom'
            }
        },
        colorAxis: {
            min: 0
        },
        series : [{
        	data:data,
            mapData: Highcharts.maps['countries/china'],
            joinBy: 'hc-key',
            name: '游客来源分布',
            states: {
                hover: {
                    color: '#BADA55'
                }
            },
            dataLabels: {
                enabled: true,
                format: '{point.name}'
            }
		}]
	});
	$(".highcharts-button").remove();
	$("g[class='highcharts-tooltip']").next().remove();
}
	
</script>
 

